package com.android.fragmentdemo.adapters
import com.android.fragmentdemo.R
import com.hengfoxwolf.commonbase.base.databeans.SlipItem
import com.android.fragmentdemo.databinding.ItemViewpager2LayoutBinding
import com.hengfoxwolf.commonbase.base.adapter.BaseRvAdapter

class ViewPager2UseAdapter() : BaseRvAdapter<SlipItem, ItemViewpager2LayoutBinding>() {
    override fun getLayoutId(): Int = R.layout.item_viewpager2_layout

    override fun bindData(holder: ViewHolder, dataItem: SlipItem, position: Int) {
        holder.binding.cvViewpager2.apply {
            setCardBackgroundColor(context.resources.getColor(dataItem.color))
        }
    }
}